package com.yb0os1.controller.admin;

import com.yb0os1.result.Result;
import com.yb0os1.serve.WorkspaceServe;
import com.yb0os1.vo.BusinessDataVO;
import com.yb0os1.vo.DishOverViewVO;
import com.yb0os1.vo.OrderOverViewVO;
import com.yb0os1.vo.SetmealOverViewVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/workspace")
@Tag(name = "处理工作台相关的接口")
public class WorkspaceController {

    @Autowired
    private WorkspaceServe workspaceServe;

    @Operation(summary = "查询今日运营数据")
    @GetMapping("/businessData")
    public Result<BusinessDataVO> getBusinessDataVO(){
        return Result.success(workspaceServe.getBusinessDataVO());
    }

    @Operation(summary = "查询套餐总览")
    @GetMapping("/overviewSetmeals")
    public Result<SetmealOverViewVO> overviewSetmeals(){
        return Result.success(workspaceServe.overviewSetmeals());
    }

    @Operation(summary = "查询菜品总览")
    @GetMapping("/overviewDishes")
    public Result<DishOverViewVO> overviewDishes(){
        return Result.success(workspaceServe.overviewDishes());
    }

    @Operation(summary = "查询订单管理数据")
    @GetMapping("/overviewOrders")
    public Result<OrderOverViewVO> overviewOrders(){
        return Result.success(workspaceServe.overviewOrders());
    }

}
